import os
import re

xmap = {}


def count(k):
    if not xmap.__contains__(k):
        xmap[k] = 1
    else:
        xmap[k] = xmap[k] + 1


def compute_tims():
    fiels = os.listdir("./raw_data")
    for f in fiels:
        con = str(f)
        datas = re.split(r'[.|-]', con)
        numders = datas[1]
        count(numders[0])
        count(numders[1])
        count(numders[2])
        count(numders[3])

    print(xmap)

if __name__ == '__main__':
    compute_tims()
